export default {
  data () {
    return {
      tableHeight: 0
    }
  },
  mounted () {
    setTimeout(() => {
      window.addEventListener('resize', this.updateTableHeight)
      this.updateTableHeight()
    }, 30)
  },
  methods: {
    updateTableHeight () {
      const wrapDom = this.$el
      const tableDom = this.$refs.autoTable.$el
      this.tableHeight = wrapDom.clientHeight - (tableDom.getBoundingClientRect().top - wrapDom.getBoundingClientRect().top) - 64
    }
  }
}
